package com.kingyea.app.market.publishMarket.service;

import com.kingyea.app.market.market.bean.Market;
import com.kingyea.app.market.publishMarket.bean.PublishMarket;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version v1.0.0
 * @description PublishMarket 接口
 * @date Created in 2018-03-19 15:48:00
 */
public interface PublishMarketService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    PublishMarket getById(String id);

    /**
     * 列表
     *
     * @param publishMarket
     * @return
     */
    Object list(Map<String, Object> publishMarket) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(String id) throws Exception;

    /**
     * 添加
     *
     * @param publishMarket
     * @return
     */
    PublishMarket save(PublishMarket publishMarket) throws Exception;

    /**
     * 更新
     *
     * @param publishMarket
     * @return
     */
    boolean update(PublishMarket publishMarket);

    Object marketList(Map<String, Object> obj) throws Exception;

    List<Market> getAllPublishMarket(Map<String, Object> publishMarket) throws Exception;

    /**
     * @Description: 发布版本
     * @param: [appCode]
     * @return: boolean
     * @author: cxc
     * @Date: 2018/6/4
     */
    boolean publicMarket(PublishMarket publishMarket) throws Exception;

    /**
     * @Description: 更新发布的版本
     * @param: [publishMarketId]
     * @return: boolean
     * @author: cxc
     * @Date: 2018/6/4
     */
    boolean updateMarket(PublishMarket publishMarket);

    /**
     * 保存一批 发布市场的 关联对象
     */
    List<PublishMarket> saveList(List<PublishMarket> publishMarketList) throws Exception;


    /**
     * 删除该app的所有发布信息
     */
    Object deletesByAppCode(String appCode) throws Exception;
}
